#ifndef GUI_ROULETTE_H
#define GUI_ROULETTE_H

#include <string>
#include <vector>

//#include "BaseElement.h"
#include "gdn/GDN.h"
#include "gui/Button.h"

#define GUI_ROULETTE_IDLE  0
#define GUI_ROULETTE_LEFT  1
#define GUI_ROULETTE_RIGHT 2

namespace gui
{
	class Roulette //: BaseElement
	{
		public:
			Roulette();
			Roulette( const gdn::Vector2f& thePos, std::vector< std::string > theOptions, int theDefaultOption,
					  gdn::Image& theImageLeftSet, gdn::Image& theImageRightSet, gdn::Image& theImageDisplay, gdn::Font& theFont, int theCharSize, gdn::Color theTextColor,
					  const gdn::Rectanglei& theRectLeftIdle, const gdn::Rectanglei& theRectLeftHover, const gdn::Rectanglei& theRectLeftPress,
					  const gdn::Rectanglei& theRectRightIdle, const gdn::Rectanglei& theRectRightHover, const gdn::Rectanglei& theRectRightPress );

			virtual int  Process( const gdn::Event& event );
			virtual void Draw( gdn::Window& window );
			virtual void Draw( gdn::RenderImage& renderImage );

			virtual std::string GetCurrentItem();

		protected:
			gdn::Vector2f pos;
			gdn::Vector2f mousePos;

			std::vector< std::string > options;
			unsigned int defaultOption;
			unsigned int current;

			gdn::Image* imageSetLeft;
			gdn::Image* imageSetRight;
			gdn::Image* imageDisplay;
			gdn::Font * font;

			int charSize;
			gdn::Color textColor;

			gdn::Rectanglei rectLeftIdle;
			gdn::Rectanglei rectLeftHover;
			gdn::Rectanglei rectLeftPress;

			gdn::Rectanglei rectRightIdle;
			gdn::Rectanglei rectRightHover;
			gdn::Rectanglei rectRightPress;

			gdn::Sprite displaySprite;
			gdn::Text displayText;
			gdn::Rectanglei* activeRectLeft;
			gdn::Rectanglei* activeRectRight;

			gui::Button buttonLeft;
			gui::Button buttonRight;

			virtual void RecenterText();
	};
}

#endif // GUI_ROULETTE_H
